package com.zjuee.core.translation.utils;

import java.util.Map;

/**
 * @author wu liang
 * @since 2020/10/10 19:59
 */
public class MergeMapOrListUtil {

    /**
     * 合并两个map数据(建议使用)
     *
     * @param mergedMap
     * @param newMap
     * @return
     * @author zero 2019/04/17
     */
    public static Map<Object, Object> mergeMapPlus(Map<Object, Object> mergedMap, Map<Object, Object> newMap, String s) {
        if (newMap == null || newMap.isEmpty())
            return mergedMap;
        for (Object key : newMap.keySet()) {
            mergedMap.put(key + s, newMap.get(key));
        }
        return mergedMap;
    }
}
